package book_management.user.operation.impl;

import book_management.user.book.BookList;
import book_management.user.operation.IOperation;

public class BorrowOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.println("请现在正在进行的是书籍的借阅工作");
        System.out.println("请输入您要借阅的书籍名称：");
        String booksName=scanner.next();
        if(bookList.isContains(booksName)){
            bookList.bookBorrow(booksName);
            System.out.println("借书成功");
        }else{
            System.out.println("您要借阅的书籍不存在");
        }
    }
}
